Skip to content

Persist custom configs during provision#132

Merged
rranjan3 merged 28 commits intomainfrom
rranjan3/custom-config
Jul 2, 2025
Merged

Persist custom configs during provision#132
rranjan3 merged 28 commits intomainfrom
rranjan3/custom-config

Conversation

@rranjan3
Copy link
Copy Markdown
Contributor

@rranjan3 rranjan3 commented Jun 12, 2025

Description

Persist custom config for each instance using tinker workflows during provisioning.

Fixes # 66948

Any Newly Introduced Dependencies

Please describe any newly introduced 3rd party dependencies in this change. List their name, license information and how they are used in the project.

How Has This Been Tested?

Created a local onboarding manager image & updated to coder EMF. Image had hardcoded values in customConfigs
deviceInfo.CustomConfigs = make(map[string]string) deviceInfo.CustomConfigs["test1"] = "# test-config1" deviceInfo.CustomConfigs["test2"] = "# test-config2"
image

Checklist:

  • I agree to use the APACHE-2.0 license for my code changes
  • I have not introduced any 3rd party dependency changes
  • I have performed a self-review of my code

rranjan3 added 4 commits June 12, 2025 12:22
Signed-off-by: Rajeev Ranjan <rajeev2.ranjan@intel.com>
Signed-off-by: Rajeev Ranjan <rajeev2.ranjan@intel.com>
Signed-off-by: Rajeev Ranjan <rajeev2.ranjan@intel.com>
Signed-off-by: Rajeev Ranjan <rajeev2.ranjan@intel.com>
@sys-orch sys-orch added the dkam label Jun 12, 2025
rranjan3 added 2 commits June 12, 2025 13:06
Signed-off-by: Rajeev Ranjan <rajeev2.ranjan@intel.com>
Signed-off-by: Rajeev Ranjan <rajeev2.ranjan@intel.com>
rranjan3 added 5 commits June 12, 2025 17:15
Signed-off-by: Rajeev Ranjan <rajeev2.ranjan@intel.com>
Signed-off-by: Rajeev Ranjan <rajeev2.ranjan@intel.com>
Signed-off-by: Rajeev Ranjan <rajeev2.ranjan@intel.com>
Signed-off-by: Rajeev Ranjan <rajeev2.ranjan@intel.com>
Comment thread onboarding-manager/internal/tinkerbell/status.go Outdated
Copy link
Copy Markdown
Contributor

@pierventre pierventre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we improve the tests?

rranjan3 added 5 commits June 14, 2025 01:23
Signed-off-by: Rajeev Ranjan <rajeev2.ranjan@intel.com>
Signed-off-by: Rajeev Ranjan <rajeev2.ranjan@intel.com>
Signed-off-by: Rajeev Ranjan <rajeev2.ranjan@intel.com>
@rranjan3
Copy link
Copy Markdown
Contributor Author

can we improve the tests?

Added some tests post refactor of utility function.

Comment thread onboarding-manager/internal/util/util.go Outdated
Signed-off-by: Rajeev Ranjan <rajeev2.ranjan@intel.com>
Copy link
Copy Markdown
Contributor

@pierventre pierventre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remeber to update the go.mod before merging

Signed-off-by: Rajeev Ranjan <rajeev2.ranjan@intel.com>
@rranjan3
Copy link
Copy Markdown
Contributor Author

rranjan3 commented Jun 25, 2025

Verified with latest changes. Able to see the split config files at desired location with expected permissions
image

@rranjan3 rranjan3 enabled auto-merge (squash) June 25, 2025 05:46
Copy link
Copy Markdown
Contributor

@niket-intc niket-intc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the infra.cfg will be the last config file that will be added in the cases custome configs are added, we need to add merge_how directive to tell cloud-init on how to merge.

Under the user data of infra.cfg include this
merge_how:

  • name: list
    settings: [ append ]
  • name: dict
    settings: [ no_replace, recurse_list ]
  • name: str
    settings: [append]

rranjan3 added 2 commits June 27, 2025 14:29
Signed-off-by: Rajeev Ranjan <rajeev2.ranjan@intel.com>
Signed-off-by: Rajeev Ranjan <rajeev2.ranjan@intel.com>
@pierventre pierventre requested a review from niket-intc July 1, 2025 16:25
@pierventre pierventre dismissed niket-intc’s stale review July 1, 2025 16:25

please review it again

Signed-off-by: Rajeev Ranjan <rajeev2.ranjan@intel.com>
@rranjan3
Copy link
Copy Markdown
Contributor Author

rranjan3 commented Jul 1, 2025

Updated merge_how to a on-liner. verified on Ubuntu EN.
image

@rranjan3 rranjan3 merged commit ba36152 into main Jul 2, 2025
28 checks passed
@rranjan3 rranjan3 deleted the rranjan3/custom-config branch July 2, 2025 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants